package com.lanmei.group.weixin.utils;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class ShiroUtil {
	
	public static String getLoginName(){
		Subject subject = SecurityUtils.getSubject();	
		if(subject.isAuthenticated()){
			return (String) subject.getPrincipal();
		}
		return "";
	}
	public static void logout(){
		Subject subject = SecurityUtils.getSubject();
		subject.logout();
	}

}
